





<template>
	<div class="school">
	
		<h2>学校名称：{{name}}</h2>
		<h2>学校地址：{{address}}</h2>
    <button></button>
    
	</div>
</template>

<script>
export default {
  name: "School",
  data() {
    return {
      name: "99白云学校",
      address: "广州白云"
    };
  },
  methods: {
    sendSchoolName() {
      this.getSchoolname(this.name);
    }
  },
  mounted() {
    // console.log(this.x)
    this.$bus.$on("hello", data => {
      console.log("我是school组件我收到了数据", data);
    });
  },
  beforeDestroy() {
    this.$bus.$off("hello")
  },
  
};
//67
</script>

<style scoped>
.school {
  background-color: rgba(147, 228, 232, 0.5);
  margin: 10px 0;
}
</style>